﻿using System;
using System.Runtime.Serialization;

namespace Loong.Threading.Locks
{
    [Serializable]
    public class LockTimeoutException : LoongException
    {
        public string Resource { get; }

        public LockTimeoutException(string resource) 
            : base($"对资源{resource}加锁超时")
        {
            Resource = resource;
        }

        protected LockTimeoutException(SerializationInfo serializationInfo, StreamingContext streamingContext)
            : base(serializationInfo, streamingContext)
        {
        }
    }
}
